
import 'package:baby/Entities/Comment/Comment.dart';
import 'package:baby/Entities/Record/RecordTag.dart';
import 'package:flutter/material.dart';

import 'package:baby/Entities/Record/RecordType.dart';

class TextRecord {
  String content;
  RecordType type;
  RecordTag tag;
  DateTime dateTime;
  List<Comment> comments;

  TextRecord({@required this.content, this.tag, @required this.type, this.dateTime, this.comments}) {
    if (this.dateTime == null) this.dateTime = DateTime.now();
    (this.comments ?? []).forEach((comment) => comment.commentTo = this);
  }
}
